package com.example.base.adapter;


import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import java.util.List;

public class MineViewPager extends FragmentPagerAdapter {
  public List<Fragment> mFragmentList;

  public MineViewPager(FragmentManager fm, List<Fragment> fragmentList) {
    super(fm);
    mFragmentList = fragmentList;
  }

  @NonNull
  @Override
  public Fragment getItem(int position) {

    return mFragmentList == null ? null : mFragmentList.get(position);
  }

  @Override
  public int getCount() {
    return mFragmentList == null ? 0 : mFragmentList.size();

  }

}
